package Text_45;

import java.util.ArrayList;
import java.util.Scanner;

public class Code {

	public static void main(String[] args) {
		ArrayList<Integer> list = new ArrayList<>();
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个数：");
        int num = sc.nextInt();
        //System.out.println(getNum(num,arr));
        int re = getNum(num,list);
        Ch(re,num);
//        for (int i = 0; i <list.size() ; i++) {
//            System.out.println(list.get(i));
//        }
       // System.out.println(re);
    }
    public static int getNum(int num,ArrayList<Integer> list){
        int re = 0;
        int num1 = num;
        int i = 0;
        while(num1>=1){

            int ge = num1%10;
            num1 = num1/10;
            list.add(ge);
            i++;
           re = re*10+ge;
        }

        return re;
    }
    public static void Ch(int re,int num){
        if(re==num) {
            System.out.println(num+"是回文数");
        }
        else{
            System.out.println(num+"不是是回文数");
        }


	}

}
